home *** CD-ROM | disk | FTP | other *** search
- unit Withunit;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Edit1: TEdit;
- Memo1: TMemo;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- with Edit1 do
- begin
- BorderStyle := bsNone;
- CharCase := ecUpperCase;
- Color := clFuchsia;
- Text := 'Agadoo, doo, doo.....';
- { The following prevents Edit1 expanding beyond the right-hand edge
- of Form1. Notice that, even here, the properties Left and Width,
- when used without qualification, refer to Edit1 }
- if (Form1.Left + Left + Width + 20 ) < (Form1.Left + Form1.Width) then
- Width := Width + 5;
- end;
- end;
-
- end.
-